/* Import all components */

@import 'themes/default/globals/site.variables';
@import 'themes/pxt/globals/site.variables';

/* Reference import */

@import (reference) "semantic.less";

/*******************************
        Debugger
*******************************/

/* Top bar menu */
.menubar .debugger-menu-item.centered {
    position: fixed;
    align-content: center;
    justify-content: center;
    right: 0;
    left: 0;
    margin-right: auto;
    margin-left: auto;
    min-height: inherit;
    width: 33%;
}

/* Debugger toolbox */
.debuggerToolbox.elements {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Debugger toolbox flyout */
.debugging .blocklyFlyout {
    display: none!important;
}

.debugging .blocklyFlyoutScrollbar {
    display: none!important;
}

/* Debugger toolbar */
.debugtoolbar {
    // don't show the toolbar unless we're debugging.
    display: none;
}

.debugging .debugtoolbar {
    width: 100%;
    z-index: @debuggerToolsZIndex;
    display: flex;
    .ui.menu {
        border-radius: 0 !important;
        border-left: none;
        display: flex;
        width: 100%;
        .item {
            padding-left: 10px;
            padding-right: 10px;
        }
        .separator-after {
            border-right: 1px solid #dddddd;
        }
    }
}

/* Debugger toolbar handle */
.ui.item.dbg-handle {
    cursor: move;
    background: #7F8C8D !important;
    .icon {
        color: white;
    }
}

/* Debugger toolbar buttons */

.ui.item.dbg-btn {
    white-space: pre;
}
.ui.item.dbg-btn .icon.blue {
    color: #0078D7!important;
}

.ui.item.dbg-btn .icon.red {
    color: #F6876D !important;
}

.ui.button.dbg-btn .icon.green {
    color: #87D282 !important;
}

.ui.item.link.dbg-btn.dbg-exit {
    background-color: #cccccc;
    color: rgb(255, 21, 0);
}

.ui.item.link.dbg-btn.disabled {
    color: rgba(40, 40, 40, .3);
}

/* Debugger variables view */
.ui.varExplorer {
    width: 100%;
    .ui.variableTableHeader {
        padding-top: 1rem;
        padding-bottom: 0.5rem;
        padding-left: 1rem;
        border: none;
        font-family: @pageFont;
        font-size: larger;
        color: black;
    }
}
.ui.segment.debugvariables {
    width: 100%;
    display: none;
    max-width: 100%;
    font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;

    .ui.middle.aligned.list {
        overflow-y: auto;
        max-height: 25rem;
    }
    .item {
        max-width: 100%;
    }
    .variableAndValue {
        display: flex;
        padding-right: 0.4rem;
        padding-left: 0.4rem;
    }

    .transparent{
        opacity: 0;
    }
    .variable {
        padding: 0.15rem;
    }
    .variable.varname {
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
        flex-grow: 2;
    }
    .variable.detail {
        overflow: hidden;
        text-align: right;
        max-width: 50%;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .varval.number {
        color: @debugNumberVariable;
    }
    .varval.string {
        color: @debugStringVariable
    }
    .varval.boolean {
        color: @debugBooleanVariable;
    }
    .varval.array {
        color: @debugArrayVariable;
    }
    .varval.Sprite {
        color: @debugSpriteVariable;
    }
    .previousval {
        text-decoration: line-through;
        font-size: 90%;
        margin-left: 0.5rem;
    }
}

.debugging .ui.segment.debugvariables {
    display: block;
    margin: 0;
    border: none;
}

.ui.segment.debugvariables:not(.frozen) .item:nth-child(even) {
    background-color: @debugVariableEven;
}
.ui.segment.debugvariables:not(.frozen) .item:nth-child(odd) {
    background-color: @debugVariableOdd;
}

.ui.segment.debugvariables.frozen {
    background: @debugVariableFrozen;
}
/* sim overlay */
div.simframe div.pause-overlay {
    background:black;
    opacity: 0.01;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: 100;
}

/* Old debugger view */
#root .debuggerview h4 {
    margin: 0.9em 0 0 0;
}

.monaco-breakpoint {
    cursor: pointer;
    background-image: url("data:image/svg+xml, %3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle fill='red' cx='50%25' cy='50%25' r='30%25' /%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.2s;
}

.monaco-breakpoint:hover {
    opacity: 0.7;
}

.monaco-breakpoint.active {
    opacity: 1;
}

.callstack-row {
    cursor: pointer;
}

@media only screen and (min-width: @computerBreakpoint) {
    .debugger div.monacoToolboxDiv {
        min-width: calc(@blocklyRowWidthWide + 100px);
    }
}

@media only screen and (min-width: @tabletBreakpoint) and (max-width: @largestTabletScreen) {
    .debugger div.monacoToolboxDiv {
        min-width: calc(@blocklyRowWidthTablet + 100px);
    }
}
